export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  dialogWidth:'70%',
  printBtn: true,
  refreshBtn: false,
  showClomnuBtn: false,
  searchSize: 'mini',
  column: [{
    label: '标识',
    prop: 'id',
    hide: true,
    addDisplay: false,
    editDisplay: false
  }, {
    label: '作业时间',
    prop: 'workTime',
    search: true,
  }, {
    label: '周期',
    prop: 'workCycle',
    type: 'select',
    dicUrl: '/admin/dict/type/plan_cycle',
    rules: [{
      required: true,
      message: '请选择周期',
      trigger: 'blur'
    }]
  }, {
    label: '月份',
    prop: 'planMonth',
    search: true,
  }, {
    label: '已分解月份',
    prop: 'decomposeMonth',
    search: true,
  }, {
    label: '工作类型',
    prop: 'planType',
    type: 'select',
    dicUrl: '/admin/dict/type/plan_type',
    search: true,
    rules: [{
      required: true,
      message: '请选择计划类型',
      trigger: 'blur'
    }]
  }, {
    label: '票种',
    prop: 'ticketType',
    type: 'select',
    dicUrl: '/support/swpmticketcardtype/dict',
    props: {
      label: 'mainName',
      value: 'mainEnName'
    },
    rules: [{
      required: true,
      message: '请选择回收票种',
      trigger: 'blur'
    }]
  }, {
    label: '原计划数量',
    prop: 'planNumberOld',
    type: 'number',
    precision: 0,
    rules: [{
      required: true,
      message: '请输入原计划数量',
      trigger: 'blur'
    }]
  }, {
    label: '现计划数量',
    prop: 'planNumberNow',
    type: 'number',
    precision: 0,
    rules: [{
      required: true,
      message: '请输入现计划数量',
      trigger: 'blur'
    }]
  }, {
    label: '已分解数量',
    prop: 'decomposeNumber',
    type: 'number',
    precision: 0,
    rules: [{
      required: true,
      message: '请输入已分解数量',
      trigger: 'blur'
    }]
  }, {
    label: '审批状态',
    prop: 'checkStatus',
    addDisplay: false,
    editDisplay: false
  }, {
    label: '审核人',
    prop: 'checkPersonId',
    hide: true,
    addDisplay: false,
    editDisplay: false
  }, {
    label: '审核时间',
    prop: 'checkTime',
    hide: true,
    addDisplay: false,
    editDisplay: false
  }, {
    label: '备注',
    prop: 'remark',
    type: 'textarea',
    maxRows:6,
    minRows:4
  }, {
    label: '创建人ID',
    prop: 'creatorId',
    hide: true,
    addDisplay: false,
    editDisplay: false
  }, {
    label: '创建人名称',
    prop: 'creatorName',
    hide: true,
    addDisplay: false,
    editDisplay: false
  }, {
    label: '创建时间',
    prop: 'createtime',
    hide: true,
    addDisplay: false,
    editDisplay: false
  }]
};

export const weekPlanOption = {
  selectable: row => {
    return row.$cellEdit === true
  },
  column: [{
    label: '月份',
    prop: 'planMonth',
    type: 'select',
    value: null,
    width: 120,
    cell: true,
    clearable: false
  }, {
    label: '周期（周）',
    prop: 'workCycle',
    type: 'select',
    dicUrl: '/admin/dict/type/plan_week_cycle',
    width: 160,
    cell: true,
    clearable: false
  }, {
    label: '周',
    prop: 'planWeek',
    disabled: true,
    formatter: (row,value,label,column) => {
      if(value){
        return value.split(',').map(m=>m+'周').join(',')
      }
    },
    width: 160,
    hide: true
  }, {
    label: '张数',
    prop: 'ticketNumber',
    type: 'number',
    width: 160,
    cell: true
  }, {
    label: '起号/止号',
    prop: 'startEndNo',
    width: 150,
    cell: true,
    hide: true
  }, {
    label: '车票用途',
    prop: 'ticketPurpose',
    width: 150,
    cell: true,
    hide: true
  }, {
    label: '计划完成时间',
    prop: 'planFinishTime',
    type: 'date',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd HH:mm:ss',
    width: 250,
    cell: true
  }, {
    label: '备注',
    prop: 'remark',
    type: 'input',
    width: 250,
    cell: true
  },
  //  {
  //   label: '审批状态',
  //   type:"select",
  //   prop: 'checkStatus',
  //   dicUrl: '/admin/dict/type/check_status',
  //   width: 130,
  // }
]
}
